package com.planegame.Obj;

import java.awt.*;

//移动背景
public class BgObj extends GameObject{
    public BgObj() {
        super();
    }

    public BgObj(int x, int y, int width, int hight) {
        super(x, y, width, hight);
    }

    public BgObj(Image img, int x, int y, double speed) {
        super(img, x, y, speed);
    }

    @Override
    public void paintSelf(Graphics gImage) {
        super.paintSelf(gImage);
        y+=speed;
        if(y>=0) y=-1400;
    }
}
